<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
function radioSubmit(){
	var radio = document.getElementsByName("radiobutton");
	var id = 0;
	for(var i = 0;i<radio.length;i++){
		if(radio[i].checked){  
        	id=radio[i].value; 
        	//alert("选择的flightID = "+id);    
   		}
	}
 
   	document.getElementById("radioID1").value = id;
   	document.getElementById("radioID2").value = id;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ASIMS</title>
<link href="/asims/CSS/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<div id="wrap">
		<div id="header">
			<h1 id="sitename"><a href="#">ASIMS</a></h1>
			<div id="nav">
				<div id="titleblock">
					<div id="subject">机场静态信息管理系统</div>
					<div id="spirit"><a href="#"><%= session.getAttribute("username") %> 已登录</a> | <a href="queryUserForIndex.action" target="_parent">个人信息维护</a> | <a href="/asims/login/login.jsp" target="_parent">注销</a></div>
			 	</div>
				<div id="topmenu">
					<ul>
						<li><a href="/asims/login/index.jsp">首页</a></li>
						<li><a href="/asims/rolemanage/user_manag.jsp">用户和角色管理</a></li>
						<li class="active"><a href="/asims/airline_manage/airline_manag_InAr.jsp">航班信息管理</a></li>
						<li><a href="/asims/facilities_manag/facilities_manag.jsp">机场设施管理</a></li>
						<li><a href="/asims/news/news_view_intr.jsp">新闻中心</a></li>
					</ul>
				</div>
			</div>
			<div class="clear"></div>
			<div id="breadcrumb">网站路径：<a href="/asims/login/index.jsp">首页</a> &raquo; <a href="#"  class="active">航班信息管理</a></div>
		</div>
		
	<div id="content">
		<div id="right">
		   <div class="post">
				<h2><a href="">国际到港</a></h2>
					<form name="form1" action="searchFlight.action" method="post"  enctype="multipart/form-data">
						<div class="contactform">
							<p class="first">
							
							<s:hidden name="flight.flighttype" readonly="true" value="国际到港"></s:hidden>
						      </p>
						        <p>
								<label for="flightnumber">航班号：</label>
								<s:textfield name="flight.flightnumber"></s:textfield>
							</p>
							<p>
								<label for="startingstation">始发地：</label>
								<s:textfield name="flight.origin"></s:textfield>
							</p>
							<p>
								<label for="airline">航空公司：</label>
								<s:textfield name="flight.airline"></s:textfield>
							</p>
							<div class="buttons">
								<div class="butarea1"></div>
								<button type="submit" class="button2" name="save">
									<img src="/asims/images/find.png" alt=""/> 
									查询
								</button>
							</div>
						</div>
					</form>
					<s:form name ="result" id ="result">
					<table cellspacing="0" cellpadding="0">
						<tr>
						  <th scope="col"></th>
						  <th scope="col">计划时间</th>
						  <th scope="col">航班号</th>
						  <th scope="col">始发地</th>
						  <th scope="col">经停地</th>
						  <th scope="col">目的地</th>
						  <th scope="col">到港时间</th>
						  <th scope="col">登机门</th>
						  <th scope="col">航空公司</th>
						</tr>
										<tr>
			<s:iterator value="flights" status="index">
			<tr>
			  <td><input name="radiobutton" id ="radiobutton" type="radio" value="<s:property value="flightId"/>" onclick = "radioSubmit()"/></td>
			  <td><s:property value="scheduletime"/></td>
			  <td><s:property value="flightnumber"/></td>
			  <td><s:property value="origin"/></td>
			  <td><s:property value="stop"/></td>
			  <td><s:property value="destination"/></td>
			  <td><s:property value="arrivalTime"/></td>
			  <td><s:property value="board"/></td>
			  <td><s:property value="airline"/></td>
			  </tr>
			</s:iterator>
			</tr>
			</table>
		</div>
		</s:form>
		<div class="pagenavi">
			<span class="alignright"><a href="listOuArFlight.action">下一页</a> &raquo;</span>
			<span class="alignleft">&laquo; <a href="listOuArFlight.action">上一页</a></span>
		</div>
            <div class="buttons">
				<div class="butarea3"></div>
				<form name="create" id ="create">
				<s:submit type ="button" name="redirect:/airline_manage/airline_manag_OuAr_add.jsp">
					<img src="/asims/images/add1-16.png" alt=""/> 
					新增
				</s:submit>
				</form>

				<form name ="delete" id ="delete" action="deleteFlightById.action">
				    <s:hidden name="flight.flightId" id="radioID1"></s:hidden>
				    <s:submit type ="button" name="delete" onClick="window.confirm('确定要删除该航班吗？')">
					<img src="/asims/images/cross.png" alt=""/> 
						删除
					</s:submit>
					</form>
				<form  name ="edit" id ="edit"  action="getFlightByFlightID.action">
				    <s:hidden name="flight.flightId" id="radioID2"></s:hidden>	
				    <s:submit type ="button" name="edit">
					<img src="/asims/images/textfield_key.png" alt=""/> 
						修改
					</s:submit>
					</form>
				</div>
				</div>
	
			<div id="sidebar">
				<div id="sidebartop"></div>
					<h2>航班信息管理</h2>
						<ul>
						  <li><a href="listInArFlight.action">国内到港</a></li>
						  <li><a href="listInDeFlight.action">国内离港</a></li>
						  <li class="active"><a href="listOuArFlight.action">国际到港</a></li>
						  <li><a href="listOuDeFlight.action">国际离港</a></li>
						</ul>
			</div>
			<div class="clear"></div>
			<div id="bottom">
				<p>Copyright &copy; 20100507</p>
				<p><a href="">隐私权</a> | <a href="">&copy;版权</a> | <a href="">法律声明</a> | <a href="">电子邮件：admin@163.com</a>
			</div>
		</div>
		
		<div id="footer">
			<div id="credits">
				ASIMS Power by IBM
			</div>
		</div>
	</div>

</body>
</html>
